package cn.gok.work.day2;

import java.util.Random;

public class SuperWorker extends Work{
    float bonus;

    public SuperWorker(String name, String job, int salary, float bonus) {
        super(name, job, salary);
        this.bonus = bonus;
    }

    public int doJob(int month){
        return (int) (super.getSalary()*month*(1+bonus));
    }
    public int doJob(int month,int addtionalHours){
        return (int) (this.doJob(month)+bonus*super.getSalary()*addtionalHours/100);
    }

}
